package com.six.core.controller;

import com.six.core.util.UploadUtil;
import com.six.core.vo.Result;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Description:
 * @author:LiWei
 * @date:2023年03月08日16:23
 */
@RestController
@RequestMapping("/user")
public class UploadController {
    @PostMapping("/upload")
    public Result upload(MultipartFile file)throws Exception{
        String s = UploadUtil.ossUpload(file);
        return new Result(200,"上传成功",s);
    }

}
